package org.raymond.iworks.study.basic.designpattern.memento;

import lombok.Getter;
import lombok.Setter;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
@Getter
@Setter
public class Originator {
    // 状态信息,可以是其他类型
    private String state;

    public Memento saveState(){
        return new Memento(state);
    }

    public void loadState(Memento memento){
        state = memento.getState();
    }
}
